package org.ytor.core.webmbc;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * created by yangtong on 2025/4/12 01:00:59
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    /**
     * 重定向
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addRedirectViewController("/", "/doc.html");
    }

//    @Override
//    public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> handlers) {
//        // 放在最前，优先处理
//        handlers.addFirst(new DownloadReturnValueHandler());
//    }
}
